package com.leyou.user.service.service;

import com.leyou.common.bean.Result;
import com.leyou.user.inter.dto.UserAdressUpdateDTO;
import com.leyou.user.inter.pojo.Area;
import com.leyou.user.inter.pojo.UserAdress;

import java.util.List;

/**
 * @author zqq
 * @ClassName AdressService
 * @Description
 * @date 2020/4/5-14:16
 */
public interface AdressService {

    /**
     * @Title: queryAreaByParentId
     * @Description: 行政区域查询
     * @author: zqq
     * @param parentId
     * @return: com.leyou.common.bean.Result<java.util.List<com.leyou.user.inter.pojo.Area>>
     * @createTime: 2020-04-05 14:33
     * @version: v.1.0
     */
    Result<List<Area>> queryAreaByParentId(Integer parentId);

    /**
     * @Title: queryUserAdressByAll
     * @Description: 获取当前登录用户的所有收货地址
     * @author: zqq
     * @return: com.leyou.common.bean.Result<java.util.List<com.leyou.user.inter.pojo.UserAdress>>
     * @createTime: 2020-04-05 14:36
     * @version: v.1.0
     */
    Result<List<UserAdress>> queryUserAdressByAll();

    /**
     * @Title: queryUserAdressById
     * @Description: 根据主键查询
     * @author: zqq
     * @param
     * @return: com.leyou.common.bean.Result<com.leyou.user.inter.pojo.UserAdress>
     * @createTime: 2020-04-05 15:35
     * @version: v.1.0
     */
    Result<UserAdress> queryUserAdressById(Long id);

    /**
     * @Title: queryUserAdressByDefault
     * @Description: 查询用户默认收货地址
     * @author: zqq
     * @param
     * @return: com.leyou.common.bean.Result<com.leyou.user.inter.pojo.UserAdress>
     * @createTime: 2020-04-05 14:41
     * @version: v.1.0
     */
    Result<UserAdress> queryUserAdressByDefault();

    /**
     * @Title: addUserAdress
     * @Description: 添加收货地址
     * @author: zqq
     * @param dto
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-04-05 14:45
     * @version: v.1.0
     */
    Result addUserAdress(UserAdressUpdateDTO dto);

    /**
     * @Title: updateUserAdress
     * @Description: 修改收货地址
     * @author: zqq
     * @param dto
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-04-05 15:14
     * @version: v.1.0
     */
    Result updateUserAdress(UserAdressUpdateDTO dto);

    /**
     * @Title: deleteUserAdress
     * @Description: 删除收货地址
     * @author: zqq
     * @param id
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-04-05 14:39
     * @version: v.1.0
     */
    Result deleteUserAdress(Long id);

    /**
     * @Title: updateDefaultAdress
     * @Description: 设置默认地址
     * @author: zqq
     * @param id
     * @return: com.leyou.common.bean.Result
     * @createTime: 2020-04-05 15:33
     * @version: v.1.0
     */
    Result updateDefaultAdress(Long id);

}
